package com.red.star.macalline.data.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * @author AMGuo
 * @Description 蓄客卡扫描日志
 * @date 2018/02/28 16:10
 */
@Data
@Table(name = "t_card_log")
public class CardLog extends BaseEntity {

    /**
     * b/c粉丝id
     */
    private Integer fansId;

    /**
     * b粉丝id
     */
    private Integer bFansId;

    /**
     * 蓄客卡id
     */
    private Integer cardId;

    /**
     * 客户扫描时的ip地址
     */
    private String ip;

    /**
     * 经度
     */
    private Double longitude;

    /**
     * 纬度
     */
    private Double latitude;

    /**
     * 导购员所属联盟组
     */
    @Column(name = "group_id")
    private Integer groupId;

    /**
     * 导购员employeeId
     */
    @Column(name = "employee_id")
    private Integer employeeId;

    /**
     * 购买者vip_open_id
     */
    @Column(name = "vip_open_id")
    private String vipOpenId;

    public CardLog() {
    }

    public CardLog(Integer fansId, Integer bFansId, Integer cardId, String ip, Double longitude,
                   Double latitude, Integer groupId, Integer employeeId, String vipOpenId) {
        this.fansId = fansId;
        this.bFansId = bFansId;
        this.cardId = cardId;
        this.ip = ip;
        this.longitude = longitude;
        this.latitude = latitude;
        this.groupId = groupId;
        this.employeeId = employeeId;
        this.vipOpenId = vipOpenId;
    }

    public CardLog(Integer cardId, Integer groupId, Integer employeeId) {
        this.cardId = cardId;
        this.groupId = groupId;
        this.employeeId = employeeId;
    }

    public CardLog(Integer cardId, String ip, Integer groupId, Integer employeeId) {
        this.cardId = cardId;
        this.ip = ip;
        this.groupId = groupId;
        this.employeeId = employeeId;
    }
}
